Development of custom electronic boards with CNC Router.
Embedded Programming
Group assignment:
- Browse through the datasheet for your microcontroller.
- Compare the performance and development workflows for other architectures.
- Document your work to the group work page and reflect on your individual page what you learned.
Individual assignment:
- Write a program for a microcontroller development board to interact (with local input &/or output devices) and communicate (with remote wired or wireless devices)
Group Assignment
- Here is the link where you can see the development of the week's group assignment.Group Assignment
During this week 6 of group work, we met with the Fablab Perú team, based in Lima, while I participated from Huánuco. Our objective was to conduct discussions and comparisons on the microcontrollers selected for our study. Each of us dedicated ourselves to the detailed analysis of a specific microcontroller, in my case I was talking about the Attiny1624 AVR, then presenting our findings to our classmates.
-
Step 1: Explore the ATTINY1624 microcontroller datasheet.
ATTINY1624
I decided to study this microcontroller from the AVR family because, despite its very small size, it offers a wide range of features. I plan to deepen its knowledge by consulting its data sheet and exploring its various functionalities in greater detail.
- 14 pin package.
- Two internal clocks 16 and 20 MHz.
- 16 KB Flash Memory.
- 256 B EEPROM.
- 2 KB SRAM.
- Maximum voltage: 6V; minimum voltage -0.5 V.
- Accurate analog features such as a 12-bit differential ADC with Programmable Gain Amplifier (PGA).
- VDD: Supply voltage.
- GND: Ground.
- Digital pins: Port A: PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7. Port B: PB0, PB1, PB2, PB3.
- Analog pins: PA1, PA2, PA3, PA4, PA5, PA6, PA7. Port B: PB0, PB1.
- UPDI Programming pin: PA0 (physical pin number 10).
- External Clock Pin: PA3.
- USART - Universal Synchronous and Asynchronous Receiver and Transmitter: It has the RX (PB2 or PA2) and the TX (PB3 or PA1).
- SPI - Serial Peripheral Interface: It has only MOSI (PA1), MISO (PA2), SCK (PA3), SS (PA4).
- TWI - Two Wire Interface (I2C): It has SDA (PB1 or PA1) and SCL (PB0 or PA2).
All I/O pins can be configured with internal pullup resistance. Within the communications section there are different types and their pins are different. It is clear that the different communication protocols cannot all be used at the same time, because they have pins in common.
Step 2: Compare performance and development workflows for other architectures
1. Other architectures to compare:
- For a comprehensive comparison, we chose ATTINY412, SAMD11C, XIAO RP2040 and XIAO ESP32-C3 microcontrollers.
2. Analyze the specifications and features:
- Comparing with the ATTINY412, we notice that they share the same 8-bit AVR architecture, but the ATTINY1624 has a larger Flash memory and a higher clock frequency.
- When contrasting with the SAMD11C, we observe that the ATTINY1624 consumes less power but has less SRAM memory and I/O capabilities compared to the 32-bit ARM Cortex-M0+ architecture SAMD11C.
- Regarding the XIAO RP2040 and XIAO ESP32-C3 microcontrollers, we note that they offer greater memory capacities and processing power, along with advanced connectivity features, but at the cost of potentially higher power consumption.
Group Assignment Conclusion
The experience I have had this week working as a team has been extraordinary. We have learned a lot thanks to our joint collaboration. Each of us dedicated ourselves to studying the data sheet of the assigned microcontroller and subsequently shared our conclusions about the advantages of these devices. This process allowed us to acquire knowledge quickly and efficiently. Without a doubt, teamwork has been key to this success.
Although I didn't have the opportunity to work directly with the Attiny1624, its potential for special applications is truly impressive. Likewise, the other microcontrollers I mentioned above are also very promising. In fact, I have already placed an order to purchase them and thus expand my personal inventory. I'm looking forward to putting everything we've learned into practice and exploring the functionalities detailed in their data sheets.
Individual Assignments
For my individual task, I designed a board for the Xiao electronic card compatible with the ESP-C3 and RP2040. I developed this board using my homemade CNC, which I introduced during week 4. My goal was to explore new functionality while making progress on my final project. This experience allowed me to put my design and manufacturing skills into practice, while also contributing to the progress of my ongoing project.
Making my electronic board
For the design of my electronic board, I chose to use Eagle software. The steps I followed were as follows: first, I opened a new project and then 'Schematic'. This allowed me to start the design process in an organized and structured way using the tools provided by EAGLE .
New project.
New Schematic.
Once on the blank page of the Eagle software, I started by adding the necessary components, such as the XIAO ESP32-C3, and proceeded to to import the corresponding libraries. Teamwork was of great help in this process, since it allowed us to learn more about the characteristics and advantages of these components. This was essential for the development of the electronic board as my final project required it, allowing me to customize the inputs and outputs according to the specific needs of the project.
Add component.
Place Adding libraries.
In the Eagle software toolbar, we proceeded to add components, selecting the XIAO ESP32-C3 card model to import it. Once imported, we chose the pins we needed to configure and then assigned the corresponding names to those pins. This process allowed us to prepare the electronic board to adapt it to the specific needs of our project.
Importing to XIAO ESP32-C3.
XIAO pin recognition.
I then proceeded to change the names based on the information provided in the XIAO ESP32-C3 datasheet. Later, I added the connectors and other necessary components following the same naming process. Finally, I completed the electronic board, as shown in the attached image.
Configuring the names of the XIAO ESP32-C3.
Board layout and final components.
Once the connections of each component with the XIAO ESP32-C3 were completed, we proceeded to route and distribute the electronic components on the board. At this point, we were asked to save the project and subsequently a new window was opened where we organized the components in an orderly manner to facilitate the process of designing and manufacturing the board.
Component distribution.
Component routing and ordering window.
We make a proper layout of all the components inserted into the board, designing it in a way that it serves as a versatile testing platform. We incorporate an OLED LCD, three analog sensors, an RGB module and a BMP280 sensor. The result is shown in the attached image. However, we are aware that this design can be further optimized for future iterations, as a version ("V2"), better adapting it to the specific needs of our final project.
End plate to produce.